Smart Testing of Functional Programs in Isabelle
نویسنده
چکیده
We present a novel counterexample generator for the interactive theorem prover Isabelle based on a compiler that synthesizes test data generators for functional programming languages (e.g. ML, Haskell) from specifications in Isabelle. In contrast to naive type-based test data generators, the smart generators take the preconditions into account and only generate tests that fulfill the preconditions. The smart generators are constructed by a compiler that reformulates the preconditions as logic programs and analyzes them with an enriched mode inference. From this inference, the compiler can construct the desired generators in the functional programming language. Applying these test data generators reduces the number of tests significantly and enables us to find errors in specifications where naive random and exhaustive testing fail.
منابع مشابه
Smart test data generators via logic programming
We present a novel counterexample generator for the interactive theorem prover Isabelle based on a compiler that synthesizes test data generators for functional programming languages (e.g. Standard ML, OCaml) from specifications in Isabelle. In contrast to naive type-based test data generators, the smart generators take the preconditions into account and only generate tests that fulfill the pre...
متن کاملCounterexample generation for higher-order logic using functional and logic programming
This thesis presents a counterexample generator for the interactive theorem prover Isabelle/HOL that uncovers faulty specifications and invalid conjectures using various testing methods. The primary contributions are two novel testing strategies: exhaustive testing with concrete values; and symbolic testing, evaluating conjectures with a narrowing strategy. Orthogonally to the strategies, this ...
متن کاملA Formal Security Model of the Infineon SLE 88 Smart Card Memory Managment
The Infineon SLE 88 is a smart card processor that offers strong protection mechanisms. One of them is a memory management system, typically used for sandboxing application programs dynamically loaded on the chip. High-level (EAL5+) evaluation of the chip requires a formal security model. We formally model the memory management system as an Interacting State Machine and prove, using Isabelle/HO...
متن کاملImplementation of a Pragmatic Translation from Haskell into Isabelle/HOL
Among other things the functional programming paradigm – in its pure form – offers the advantage of referential transparency. This facilitates reasoning over programs considerably. Haskell is one of the rare purely functional programming languages that is also of practical relevance. Yet, a comparable success for the verification of Haskell programs has not been achieved, so far. Unfortunately,...
متن کاملThe Influence of Smart Grid on TOU Programs With Respect to Production Cost and Load Factor, A Case Study of Iran
Reaching an electricity system which is both economically efficient and environmentally friendly is motivating countries to design and execute different types of TOU demand response programs. But there are certain deficiencies which prevent these programs to effectively modify the load shape. Smart grid as a means could help the electricity system to reach the highest demand side management ...
متن کامل